#ifndef __APP_STORE_H_
#define __APP_STORE_H_
#include <stdint.h>

typedef struct pid_cache {

	float kp;
	float ki;
	float kd;
	float out_max;
	float out_min;
	float sv;
	float foutput_value;
	float input_value;
	uint16_t output_value;
	uint16_t output_dir;
	uint32_t delay_ms;

/* data */
} pid_cache_t;
typedef enum app_store_state {
	as_yes = 1, as_no = 0
} app_store_state_e;

void app_store_init();

int app_store_get_save_param_state();
void app_store_set_save_param_state(int state);

int app_store_get_pid_ctrl_state();
void app_store_set_pid_ctrl_state(int state);

int app_store_get_pid_no_measure_state();
void app_store_set_pid_no_measure_state(int state);

int app_store_get__maintenance_state();
void app_store_set__maintenance_state(int state);

int app_store_get_calibration_density_state();
void app_store_set_calibration_density_state(int state);

void app_store_set_calibration_viscosity_state(int state);
int app_store_get_calibration_viscosity_state();

int app_store_get_stabilize_value_state();
void app_store_set_stabilize_value_state(int state);

int app_store_get_pwm_output_value();
void app_store_set_pwm_output_value(uint16_t value);

int app_store_get_pwm_output_dir();
void app_store_set_pwm_output_dir(uint16_t value);

void app_store_set_pid_param_to_slave();
void app_store_set_pid_param_from_slave();

void app_store_set_density_value(uint16_t *value);
void app_store_set_temperature_value(uint16_t *value);
void app_store_set_dynviscosity_value(uint16_t *value);
void app_store_set_kinviscosity_value(uint16_t *value);

void app_store_get_stddensity_value(uint16_t *value);
void app_store_get_stdviscosity_value(uint16_t *value);

extern pid_cache_t pid_cache;

#endif
